<% include '/WEB-INF/includes/header.gtpl' %>

<div align = "center">

	<table align="left">
	<%
		request.articleList.each { art -> 
	%>
	<tr>
	<td width="50">标题</td>
	<td width="92%">${art.title}</td>
	<td width="50"><a href="/deletearticle/${art.link}">删除</a></td>
	</tr>
	
	<tr>
	<td>内容</td>
	<td>${art.content}</td>
	<td><a href="/editarticle/${art.link}">编辑</a></td>
	</tr>
	
	<tr>
	<td>时间</td>
	<td>${art.pubTime}</td>
	<td></td>
	</tr>
	
	<tr>
	<td colspan=3 ><hr /></td>
	</tr>
	
	<% } %>
	
	</table>
	
	<%
		def page = request.page as Integer
	%>
	<div align="left">
	<%
		if(request.articleList.size() == 5){
	%>
	<%= page == 1 ? "<a href='/editlist/${page+1}'>下一页</a>" : "<a href='/editlist/${page-1}'>上一页</a>|<a href='/editlist/${page+1}'>下一页</a>" %>
	<%
		}else{
	%>
	<%= page == 1 ? "" : "<a href='/editlist/${page-1}'>上一页</a>" %>
	<%		
		}
	%>
	</div>
	
</div>

<% include '/WEB-INF/includes/footer.gtpl' %>